package com.solcoo.dao;

import java.sql.SQLException;
import javax.annotation.Resource;
import org.springframework.stereotype.Repository;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.solcoo.pojo.CheckTime;

@Repository
public class CheckTimeDao {

	@Resource
	private SqlMapClient sqlMapClient;
	
	public CheckTime getCheckTime(CheckTime checkTime) throws SQLException {
		return (CheckTime) sqlMapClient.queryForObject("getCheckTime", checkTime);
	}
	
	public boolean addCheckTime(CheckTime checkTime) throws SQLException {
		sqlMapClient.insert("addCheckTime", checkTime);
		
		if (checkTime.getId() > 0)
			return true;
		else
			return false;
	}

	public void updateCheckTime(CheckTime ct) throws SQLException {
		sqlMapClient.update("updateCheckTime", ct);
	}

	
}